feat: add local llama-cpp embedding support#1388
feat: add local llama-cpp embedding support#1388MaojiaSheng merged 2 commits intovolcengine:mainfrom
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
6e57688 to
f6ff2a0
Compare
|
发现有几个
|
f6ff2a0 to
4d6e34e
Compare
…mports, and config singleton deadlock fix Made-with: Cursor Co-authored-by: GPT-5.4 <noreply@openai.com>
4d6e34e to
0fe5264
Compare
* feat: local llama.cpp embedding support, setup wizard, lazy storage imports, and config singleton deadlock fix Made-with: Cursor Co-authored-by: GPT-5.4 <noreply@openai.com> * fix: remove unsupported custom local gguf setup --------- Co-authored-by: GPT-5.4 <noreply@openai.com>
Description
This PR extends the
openviking-server initinteractive setup wizard to support a second local embedding path based onllama-cpp-python, while preserving the existing Ollama-based local setup flow.In other words, this PR follows the "route 2" direction we discussed:
llama-cpp-pythonsetup pathThis PR builds on top of the existing local embedding runtime support already present on
main; it mainly focuses on setup UX, config generation, and a config initialization deadlock fix.Related Issue
openviking-server initinteractive setup wizard for local Ollama model deployment #1353Type of Change
Changes Made
openviking-server initwith a newllama.cpp/ GGUF local embedding path.bge-small-zh-v1.5-f16.llama-cpp-python, with guided installation via:pip install "openviking[local-embed]"llama.cppsetup path, allow three VLM choices:openviking/storage/__init__.pyto avoid import-time deadlock when the native engine extension is loaded.OpenVikingConfigSingleton.Why This Matches Route 2
This PR matches the route-2 direction because it does not collapse everything into a single Ollama-only or llama-cpp-only flow.
Instead, it keeps both local paths available:
llama-cpp-pythonbecomes the direct GGUF local embedding optionThat is the core product shape we agreed on for route 2.
Testing
Validation performed:
python3 -m py_compile openviking/storage/__init__.py openviking_cli/setup_wizard.py openviking_cli/utils/config/open_viking_config.py tests/cli/test_setup_wizard.pyPYTHONPATH=. ./.venv/bin/python -m pytest -q tests/cli/test_setup_wizard.py --maxfail=1PYTHONPATH=. ./.venv/bin/python -m pytest -q tests/cli/test_doctor.py --maxfail=1Known Limitations
bge-small-zh-v1.5-f16only.Checklist
Screenshots (if applicable)
N/A
Additional Notes
The old PR description referred to the earlier local embedding runtime implementation. This has been updated to reflect the current scope of the branch, which is now centered on the setup wizard, route-2 local setup shape, and the config/import fixes.